package bll

import (
	"jgt-oper/src/model"
	"jgt-oper/src/schema"
)

// EnterprisePark 企业门牌
type EnterprisePark struct {
	EnterpriseParkModel model.IEnterprisePark `inject:"IEnterprisePark"`
}

// Create 创建门牌
func (a *EnterprisePark) Create(item *schema.EnterprisePark) error {
	return a.EnterpriseParkModel.Create(item)
}

// Get 查询
func (a *EnterprisePark) Get(enterpriseID string) (*schema.EnterprisePark, error) {
	return a.EnterpriseParkModel.Get(enterpriseID)
}

// Delete 标记删除
func (a *EnterprisePark) Delete(enterpriseID string) error {
	return a.EnterpriseParkModel.Delete(enterpriseID)
}

// AddNodes  添加节点门牌
func (a *EnterprisePark) AddNodes(enterpriseID string, nodes []string) error {
	return a.EnterpriseParkModel.AddNodes(enterpriseID, nodes)
}

// DeleteNodes 删除减少门牌
func (a *EnterprisePark) DeleteNodes(enterpriseID string, nodes []string) error {
	return a.EnterpriseParkModel.DeleteNodes(enterpriseID, nodes)
}

// FreezeEntrance 添加冻结的门禁
func (a *EnterprisePark) FreezeEntrance(freezeParams *schema.FreezeParams) error {
	return a.EnterpriseParkModel.FreezeEntrance(freezeParams)
}

// UnfreezeEntrance 解冻企业的门禁设备
func (a *EnterprisePark) UnfreezeEntrance(freezeParams *schema.FreezeParams) error {
	return a.EnterpriseParkModel.UnfreezeEntrance(freezeParams)
}
